﻿#include "Snake.h"


void test()
{
	int ch = 0;
	do
	{
		system("cls");
		Snake snake = { 0 };
		GameStart(&snake);
		GameRun(&snake);
		GameEnd(&snake);
		SetPos(20, 15);
		printf("再来一局吗？(Y/N):");
		ch = getchar();
		getchar();//清理\n

	} while (ch == 'Y' || ch == 'y');
	SetPos(0, 27);
}


int main()
{
	setlocale(LC_ALL, "");//设置本地环境
	srand((unsigned int)time(NULL));
	test();
	return 0;
}